-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
honour tag element within rock-on json. Fixes #2014 #2016
honour tag element within rock-on json. Fixes #2014 #2016
Conversation
Works by simply appending the already processed 'tag' json element within Rock-on definition files to docker image related commands. Summary: - honour existing "tag" element as defined in rockon-registry repo. - add debug logging to the main docker commands. - minor docstring addition. add doc strings rockstor#2014
@FroggyFlox I'm popping this one in now as it's a dependency for another pr I'm working on in rockon-registry. I will rebase later if need be as we go as I know you have made a number of changes in this area that are both pending in pr and pre pr. |
Thanks for fixing this! I didn't even realize that we had the "tag" supported and parsed... I should have paid more attention. Regarding the image uninstall, I believe it is "simply" due to the fact that we do not remove the docker image upon Rock-on uninstall. Luckily the
I do, indeed, have extensive additions and edits to I'll test and make a proper Github review of this one if you want, but that seems good at first glance. I'll have a better look at it as soon as possible. |
@FroggyFlox Thanks for the review offer. Much appreciated. |
@FroggyFlox We can always just lookup which share is our Rock-ons-root as we do when blocking that share's deletion. So we can likewise look to a snapshots parent share to see if it is thus. At least I think so (bit late here now). Plus I found the prior chat re image pruning via docker:
And it's variations is what we were waiting for and now have. More details in forum thread. |
Thanks for all the pointers and references of prior discussions, @phillxnet ; as I didn't know about them, it's always very interesting and useful ;-)
Agreed to re-visit this... I'll be meaning to open a discussion about that (here or forum), especially after repeatedly discussing in the forum the use of an "advanced scripts" section that could include
I forgot about that one... I've been so focus on the network side of Rockstor lately that I can't see anything else. I'll keep this for the corresponding issue too. I'll try to come back with a review to the current PR as soon as possible. |
I started testing your PR and it does work as intended. First, thanks for adding Regarding your PR, I'll submit a proper review with comments where I do have some, but those are only that: comments. The code works as indicated. There is one comment I have that is not related to your commits, but actually concerns how we are parsing the The code in question is from rockon.py:
As stated above, we are feeding the
As mentioned above, however, I'm not sure this would happen in real use, but should we prepare for that? It does not break the system, only prevents the use of different tags. Notably, it also indicates another issue more likely to arise as the above applies if two different rock-ons use the same image but with a different tag. The first rock-on to be processed with take priority in this case, such that the second one will use the tag of the first one. Again, these are not directly related to the issue your PR addresses, so I can create a dedicated one if you prefer. Cheers, |
@FroggyFlox Thanks for taking a look at this pr and checking functionality. Much appreciated. Re your comment on our image/tag db table (storageadmin_dimage) that's a nice find, missed that myself, and definitely deserves a focused issue. But I agree with you that it's rather in the corners, but if we have the issue we can more easily keep it in mind. Especially as we get more Rock-ons / images. Re the log=True I think is the way to go for this as it's still very much in development (by you mainly) and only logs if debug is enabled anyway so shouldn't affect production releases. And as you say makes for easier diagnosis 'in the field' as when debug is on we can see those docker commands and their call order. Cheers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the specific comments, changes in openvpn_install and owncloud_install are ok, but I can't seem to find a usage for these methods anymore. I'll try to test whether they are still required when I get the chance.
Changes in the PR are OK, tested in 3.9.2-47
@FroggyFlox Let me know if you manage to confirm the openvpn / owncloud related code changes as I'm pretty sure I found they were not in dead code, as per my replies to your code comment review. Thanks for the review by the way and see how you get on with that confirmation. |
@FroggyFlox Thanks for being so diligent on this by the way. |
I finally tracked them down... I should have been more attentive while reading this, but here's where these methods are called:
Thanks a lot for finding these out, @phillxnet! |
@FroggyFlox Well done tracking that down, good to have gotten that sorted. So are we happy with this pull request's changes as they stand, review wise; so we can put it to bed? At least then we can 'mostly' honour tags going forward, given your nice fine re limitation of scope bug and the linked issue you opened. |
Yes, I'm all ok with your changes, sorry I sidetracked the conversation :-( |
Works by simply appending the already processed 'tag' json element within Rock-on definition files to docker image related commands.
Summary:
Fixes #2014
Ready for review by contributor with docker and Rock-on code experience.
Testing:
A test case Rock-on used was the existing duplicati2-canary.json as it has, unlike almost all our Rock-ons, a 'tag' element specified.
This Rock-on was installed pre-pull request and the indicated image used was latest (Docker Hub default):
Post pr we get the stipulated image variant (via it's tag):
Caveats:
When removing and re-installing this Rock-on, having applied the changes proposed here. we are left with the old image:
Currently published affected Rock-ons:
Haproxy-letsencrypt, and Collabora Online both also have the tag element but it is set to 'latest'.